Multifunction printer and image processing method

ABSTRACT

This invention relates to an MFP having copy and scanner functions. The MFP in which image data flows from a line sensor to a DRAM via an A/D conversion unit and a reading control unit (RCU) and then from an image processing unit (IPU) to a printer via the DRAM has the following arrangement. Both the RCU and the IPU can execute a shading process. In the CM, the RCU executes the shading process. Then, the image is compressed and stored in the DRAM. In the SM, the RCU does not execute the shading process, and the image is temporarily stored in the DRAM without compression. The IPU reads out image data of each rectangle from the DRAM together with shading data, executes the shading process and various kinds of image processing, and outputs the image data to the DRAM.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a multifunction printer having a copyfunction and a scan function capable of transferring read image data toa connected host apparatus, and an image processing method.

2. Description of the Related Art

FIG. 5 is a block diagram showing the arrangement of a conventionalmultifunction printer (to be referred to as an MFP hereinafter) having acopy function and a scan function.

Referring to FIG. 5, a control chip 10 controls the entire apparatus.Each of blocks 100 to 1200 to be described below is integrated in asingle chip. A scanner I/F 100 receives, from the outside of the controlchip 10, image data of each line A/D-converted by an AFE 2400 and writesthe image data in a main memory 2000 by using a DMAC 110.

A scanner image processing unit 200 reads out image data from the mainmemory 2000 by using a DMAC 210, executes predetermined image processingsuch as edge enhancement and γ-conversion, and writes the process resultin the main memory 2000 again by using the DMAC 210.

A printer image processing unit 300 is a block that converts image dataprocessed by the scanner image processing unit 200 into a CMYK (density)data for printer output. The printer image processing unit 300 writesand reads to/from the main memory 2000 by using a DMAC 310.

A printer I/F 400 is an interface circuit that transmits CMYK data, thatis the process result of the printer image processing unit 300, to aprinter 2100. The printer I/F 400 reads from the main memory 2000 byusing a DMAC 410.

The scanner I/F 100, scanner image processing unit 200, printer imageprocessing unit 300, and printer I/F 400 connect to a common image bus1100 via the DMACs 110, 210, 310, and 410, respectively.

A memory control unit 500 executes arbitration and interface controlbetween the main memory 2000, and the image bus 1100 or a control bus1200.

A CPU 600 controls the entire apparatus.

A motor controller 700 controls the motor of the scanner or printer.

A panel I/F 800 executes interface control to an operation unit 2500.

An SIO 900 executes interface control to a ROM 2600.

A USB device I/F 1000 executes a communication process with a hostapparatus (PC) connected to the MFP.

The CPU 600, motor controller 700, panel I/F 800, SIO 900, and USBdevice I/F 1000 connect to the common control bus 1200.

The main memory 2000 is used by the CPU 600 or each process block as awork memory. The printer 2100 outputs image data to a printing mediumsuch as a printing paper sheet. An image reading processing unit 2300uses an optical device such as a CCD or CIS. The AFE 2400 A/D-convertsimage data that is line-sequentially output from the image readingprocessing unit 2300 as analog data and outputs the converted image datato the scanner I/F 100 of the control chip 10 as image data of eachline.

The operation unit 2500 includes an LCD to output various kinds ofinformation to the user of the MFP and keys to be directly operated bythe user, and inputs/outputs information to/from the control chip 10 viathe panel I/F 800. The ROM 2600 stores the operation program of the CPU600.

FIG. 6 is a block diagram showing the detailed arrangement in thescanner image processing unit 200.

Referring to FIG. 6, a shading processing unit 201 corrects thesensitivity fluctuation between the pixels of the CCD and CIS. Aγ-conversion processing unit 202 converts the gradation characteristicof image data that has undergone the shading process. A characterdetermination processing unit 203 checks the pixel values of n×n pixelswith a given central pixel and determines whether or not they are partof a character image. A filter processing unit 204 executes edgeenhancement and moire suppression by filter calculation based on thepixel values of m×m pixels with a given central pixel.

The shading processing unit 201, character determination processing unit203, and filter processing unit 204 have a dedicated shading (SHD)buffer 201 a, and dedicated line buffers 203 a and 204 a to storeshading data or image data of a plurality of lines, respectively. Imagedata or shading data stored in the main memory 2000 is read out in themain scanning direction (the moving direction of the CCD or CIS) incorrespondence with a plurality of lines, stored in the line buffers,and individually processed.

For example, Japanese Patent Publication Laid-Open No. 7-170372discloses a prior art apparatus with the above-described conventionalarrangement.

The arrangement disclosed in Japanese Patent Publication Laid-Open No.7-170372 requires a very large capacity line memory because each imageprocessing block in the image processing unit must have a line memorynecessary for the image processing. For example, a line memorycorresponding to four lines of an original width is necessary for a 5×5pixel filter process. If an input image is an A4 color image having aresolution of 600 dpi (=5000 pixel/line) and 16 bits per pixel, thecontrol chip 10 must incorporate a large capacity memory of 120 kB.Additionally, the memory size needs to be proportional to the resolutionof input image data and the actual original size in the widthwisedirection.

To solve this problem, Japanese Patent Publication Laid-Open No.2004-220584 proposes a new image processing system.

According to Japanese Patent Publication Laid-Open No. 2004-220584,image data output from the reading control unit and line-sequentiallystored in the main memory is read out in correspondence with eachrectangle including a “margin” necessary for image processing, as shownin FIG. 7. In addition, light/dark shading data at the positioncorresponding to the rectangle is read out from the main memorysimultaneously. The image processing unit executes various kinds ofimage processing such as a shading process and writes the process resultin the main memory in correspondence with each rectangle again.

This process allows each image processing unit to have a line memorycorresponding to not the original width but only the width of therectangle. It is therefore possible to greatly reduce the total size ofthe line memories of the image processing units. If input image data hasa higher resolution, or the input image size itself increases from,e.g., A4 to A3, it is necessary to merely increase the number of timesof rectangle readout from the main memory. Hence, it is easy to copewith even an increase in the resolution or size of an image. The“margin” here indicates an area that must be read out from the mainmemory as an additional area outside the input rectangle to executeimage processing for the whole input rectangle. For example, to performa 5×5 pixel filter process, two extra lines must be read out on each ofthe upper, lower, left, and right sides of an input rectangle.

However, the method disclosed in Japanese Patent Publication Laid-OpenNo. 2004-220584 still has a problem.

In this method, the image processing unit cannot start the processbefore the scanner I/F outputs image data corresponding to thelongitudinal size of the rectangle to the main memory. Hence, the mainmemory must have a capacity to store at least the longitudinal size ofthe rectangle of image data of one line.

This problem is solved by simply reducing the longitudinal size of therectangle, as a matter of course. In this case, however, the “margin”added to the rectangle read out from the main memory and shading datanecessary for the shading process of the rectangle suffer a greatinfluence. When the longitudinal size of the rectangle corresponds to nlines, the 5×5 pixel filter process requires a margin corresponding to atotal of four lines on the upper and lower sides and shading datacorresponding to two lines (light/dark). It is therefore necessary toread out data corresponding to (n+6) lines from the main memory. Thismeans that, as n becomes smaller, the necessary data amount to be readout from the main memory increases relatively. This requires a wide dataaccess band between the control chip 10 and the main memory 2000.

The memory necessary for using the scanner function of the MFP has beendescribed above. An MFP having a copy function requires a memory forboth the scanner and print functions. FIG. 8 shows the data flow in theMFP in this case.

In the copy mode, image data read by the image reading processing unit2300 and A/D-converted by the AFE 2400 is temporarily written in buffer1 in the main memory 2000 line-sequentially. The scanner imageprocessing unit 200 reads out the image data from buffer 1 together withshading data corresponding to a rectangle including a margin, executesvarious kinds of image processing, and writes the processed image datain buffer 2 in the main memory. The printer image processing unit 300line-sequentially reads out the image data from buffer 2, converts theimage data into CMYK binary data processible by the printer 2100, andwrites the data in buffer 3 in the main memory 2000. The printer I/F 400reads out the CMYK binary data written in buffer 3, outputs the data tothe printer 2100, and prints it on an output paper sheet.

In the scan mode, the data flow up to the scanner image processing unit200 is the same as described above. The data output from the scannerimage processing unit 200 is stored not in buffer 2 but in thetransmission buffer to the USB device I/F 1000 and transmitted to the PCvia the USB. Buffers 2 and 3 are unnecessary. Since the size of thetransmission buffer is smaller than that of buffer 2 or 3, the requiredtotal size of the buffer memory is smaller than in the copy mode.

As described above, in the copy mode, all of the scanner I/F, scannerimage processing unit, printer image processing unit, and printer I/F inthe MFP access the main memory. To do this, the main memory mustincorporate buffers 1 to 3 to buffer the process speed differencebetween the process blocks. Additionally, a very wide data access bandis necessary between the control chip and the main memory.

As summarized, the method proposed in Japanese Patent PublicationLaid-Open No. 2004-220584 has the following problems.

(1) The buffer memory (buffer 1 in FIG. 8) between the scanner I/F andthe scanner image processing unit must have a relatively large capacity.

(2) In the copy mode, the main memory requires a buffer memory (buffer1+buffer 2+buffer 3 in FIG. 8) with a large capacity, and a wide dataaccess band is necessary between the control chip and the main memory.

SUMMARY OF THE INVENTION

Accordingly, the present invention is conceived as a response to theabove-described disadvantages of the conventional art.

For example, a multifunction printer having a copy function and ascanner function and an image processing method according to thisinvention are capable of implementing both a high memory utilization ina copy mode and a high image quality in a scan mode.

According to one aspect of the present invention, preferably, there isprovided a multifunction printer having a first function of copying animage original and a second function of outputting image data obtainedby scanning the image original to an external device (PC), comprising:reading means for line-sequentially reading the image original by scan;a memory which stores image data read by the reading means; first imageprocessing means for executing the first function; and second imageprocessing means for executing the second function, wherein the firstimage processing means includes: compression means for compressing theimage data read by the reading means; and first output means foroutputting the compressed image data compressed by the compression meansto the memory.

According to another aspect of the present invention, preferably, thereis provided an image processing method executed by a multifunctionprinter having a first function of copying an image original and asecond function of outputting image data obtained by scanning the imageoriginal to an external device (PC), comprising the steps of:line-sequentially reading the image original by scan; compressing theimage data read in the reading step upon executing the first function;and outputting the compressed image data compressed in the compressingstep to a memory.

The invention is particularly advantageous since the total memory sizerequired of the multifunction printer to implement necessary functionscan be reduced. Additionally, since compression upon storing read imagedata in the memory is executed only when executing the copy function,image quality degradation when executing the scan function can beprevented.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments (with reference to theattached drawings).

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing the schematic arrangement of amultifunction printer as a typical embodiment of the present invention;

FIG. 2 is a flowchart illustrating an input image data DPCM(differential pulse code modulation) compression process executed in animage copy mode;

FIG. 3 is a flowchart illustrating data readout from each memory and aDPCM decompression process executed in an image copy mode;

FIG. 4 is a view showing a buffer memory capacity necessary when copyand scan are executed;

FIG. 5 is a block diagram showing the schematic arrangement of aconventional multifunction printer;

FIG. 6 is a block diagram showing the internal arrangement of a scannerimage processing unit of the multifunction printer shown in FIG. 5;

FIG. 7 is a view showing image data readout from a main memory andoutput to the main memory after image processing which are executed by ascanner image processing unit, according to Japanese Patent PublicationLaid-Open No. 2004-220584;

FIG. 8 is a view showing the relationship between image processing unitsand the buffers in the main memory of the conventional multifunctionprinter; and

FIG. 9 is a block diagram showing the schematic arrangement of amultifunction printer according to another embodiment of the presentinvention.

DESCRIPTION OF THE EMBODIMENTS

Preferred embodiments of the present invention will now be described indetail in accordance with the accompanying drawings.

In this specification, the terms “print” and “printing” include not onlythe formation of significant information such as characters andgraphics, but also the formation of images, figures, patterns, and thelike on a print medium, or the processing of the medium, regardless ofwhether they are significant or insignificant and whether they are sovisualized as to be visually perceivable by humans.

Also, the term “print medium” includes not only a paper sheet used incommon printing apparatuses, but also materials, such as cloth, aplastic film, a metal plate, glass, ceramics, wood, and leather, capableof accepting ink.

FIG. 1 is a block diagram showing the schematic arrangement of amultifunction printer (MFP) as a typical embodiment of the presentinvention. The same reference numerals as in the prior art denote thesame constituent elements, and a description thereof will not berepeated. The difference in characteristic features between the MFP ofthe prior art and that of the embodiment will be described here on thebasis of comparison with the arrangement shown in FIG. 5.

As is apparent from comparison between FIGS. 1 and 5, this embodimentadds a copy image processing unit 120 to the output of the scanner I/F,as shown in FIG. 1. The copy image processing unit 120 incorporates ashading memory (SRAM) 122 to store shading data of a necessary amount ina copy mode, a shading processing unit 121, a γ-conversion processingunit 123, and a DPCM compression processing unit 124. A shadingprocessing unit 201 remains in a scanner image processing unit 200 as inthe prior art. A DPCM decompression processing unit 205 is added to thescanner image processing unit 200.

The remaining components are the same as in the prior art shown in FIG.5. The blocks connected to the control bus side are not illustrated inFIG. 1.

Processing operations executed by the MFP having the arrangement shownin FIG. 1 in copy and scan modes will be described below in detail.

<Process in Scan Mode>

The process in the scan mode will be described first. The contents ofthis process are fundamentally the same as those disclosed in JapanesePatent Publication Laid-Open No. 2004-220584 and will be describedbelow.

1. Light/dark shading data of each color component is acquired inadvance and held in a main memory 2000.

2. An original reading process starts. Digital image data isline-sequentially input from an AFE 2400 to a control chip 10 via ascanner I/F 100.

3. Uncompressed data is line-sequentially written in the main memory2000 by a DMAC 110 without using the copy image processing unit 120.

4. The scanner image processing unit 200 starts the process when theline-sequential image data output to the main memory 2000 exceeds theheight (including the margin) of a rectangle to be processed by thescanner image processing unit 200. When the output rectangle size of thescanner image processing unit 200 is m×n, a margin corresponding to twopixels on each of the upper, lower, left, and right sides is necessaryfor a 5×5 pixel filter process. Hence, the input image is a rectanglewith a size of (m+4)×(n+4) pixels. A DMAC 210 reads out rectangularimage data corresponding to this part and shading data of (m+4)×twolines (light/dark) corresponding to this part simultaneously, as shownin FIG. 7.

5. The blocks in the scanner image processing unit 200 execute theshading process, input γ-conversion process, and filter process. TheDMAC 210 outputs the rectangular image data with m×n pixels as a processresult except the margin portion.

6. The processes 4 and 5 are repeated until image data corresponding toone stripe (the sum of output rectangles in the main scanning direction)is output. A CPU 600 line-sequentially transmits the processed imagedata of one stripe output to the main memory 2000 to a connected PC viaa USB device I/F 1000.

7. When the output image data from an image reading processing unit 2300reaches the height (the (2n+4)th line counted from the beginning) of thenext rectangle to be processed by the scanner image processing unit 200,the scanner image processing unit 200 starts the process of the nextstripe. In the same way, the process is repeated every time datacorresponding to n lines is output from the image reading processingunit 2300 and stored.

<Process in Copy Mode>

The process in the copy mode will be described next.

A process of line-sequentially inputting image data from the AFE 2400and outputting it to the main memory 2000 will be described first.

1. Shading data with a copy resolution is acquired in advance, and iswritten in the shading (SHD) memory (SRAM) 122.

2. An original reading process starts. Line-sequential digital imagedata is input from the AFE 2400 to the control chip 10 via the scannerI/F 100.

3. The line-sequential digital image data output from the scanner I/F100 is input to the copy image processing unit 120. The shadingprocessing unit 121 in the copy image processing unit 120 executes theshading process. Shading data is read out from the shading memory 122,as needed, in synchronism with the input image data. Since this processcorrects the sensitivity fluctuation between the pixels of the sensor,image quality degradation caused by subsequent DPCM compression processcan be minimized.

4. The γ-conversion processing unit 123 executes the input γ-conversionprocess. This process reduces the number of gradations of the inputimage. Thus, image quality degradation caused by the subsequent DPCMcompression process can be suppressed further.

5. The DPCM compression process is executed for each line of the inputimage. The algorithm of DPCM compression will be described later.

6. The compressed image data of each line is written in the main memory2000 by using the DMAC 110.

With the DPCM compression process, the image data containing 16 bits perpixel, which is obtained as a result of the shading process and inputγ-conversion process, is compressed to fixed length image datacontaining 8 bits per pixel.

FIG. 2 is a flowchart illustrating the outline of the DPCM compressionprocess.

Let p[i] (16 bits) be the i-th pixel value from the left end in one lineof an input 16-bit digital image, c[i] (8 bits) be coded datacorresponding to the pixel, and q[i] (16 bits) be decoded data.

In addition,table[j]=(int)(j/512)+128

-   -   (−65536<j<65536)        revtable[k]=(k−128)*512    -   (0≦k<256)

In step S601, the value i is checked. If i=0, the process advances tostep S602. If i≠0, the process advances to step S603.

In step S602, c[i]=p[i]>>8 and q[i]=c[i]<<8 are calculated. Then, theprocess advances to step S605. Note that “>>8” indicates an operation ofshifting the input bit string to the right by 8 bits while “<<8”indicates an operation of shifting the input bit string to the left by 8bits. With this operation, all the lower 8 bits of the image data with16 bits per pixel are set to “0”.

In step S603, c[i]=table[p[i]−q[i−1]] and q[i]=q[[i−1]+revtable[c[i]]are calculated. Then, the process advances to step S604.

In step S604, if q[i]>65535, q[i]=65535. If q[i]<0, q[i]=0. Then, theprocess advances to step S605.

In step S605, the value i is incremented by “+1”. Then, the processadvances to step S606.

In step S606, it is checked whether or not the pixel of interest existsat the right end of the image. If “YES” in step S606, the process ends.Otherwise, the process returns to step S603.

By executing the DPCM compression process for each line of the inputimage data, the output from the image reading processing unit is fixedlength-compressed from 16 bits to 8 bits per pixel.

How the scanner image processing unit 200 processes the compressed imagedata written in the main memory 2000 will be described next withreference to a flowchart.

FIG. 3 is a flowchart illustrating the compressed image datadecompression process by the scanner image processing unit 200.

In step S701, the DMAC 210 of the scanner image processing unit 200reads out, from the main memory 2000, image data including an outputrectangle with m×n pixels and a margin corresponding to two pixels oneach of the upper, lower, left, and right sides, as shown in FIG. 7, asin the scan mode. Note that the data amount and address difference valueare ½ in reading out a rectangle at the same position as in the scanmode because the image data is fixed length-compressed from 16 bits to 8bits per pixel. It is unnecessary to read out shading data.

In step S702, the DPCM decompression processing unit 205 in the scannerimage processing unit 200 executes a DPCM decompression of the imagedata read out via the DMAC 210 on the basis of the following algorithm.The decompression process needs to be performed for each line of therectangle.

In the following explanation, when the output rectangle contains m×npixels, the input rectangle contains (m+2)×(n+2) pixels. Let c[i,j] becoded data (8 bits per pixel) at coordinate values (i,j), and q[i,j] bethe decompression result (16 bits per pixel).

In step S702-1, i=j=0.

In step S702-2, it is checked whether or not the input rectangular image(stripe) is at the left end of the input image. If “YES” in step S702-2,the process advances to step S702-3. Otherwise, the process advances tostep S702-11.

In step S702-3, the decompression process of the j-th line of the inputrectangle starts.

In step S702-4, two pixels at the left end of the input rectanglecorrespond to the margin. Coded data representing the actual imagestarts from the next input pixel. For this reason, “65535” is alwaysoutput for two pixels at the left end as white pixels. That is,q[0,j]=q[1,j]=65535.

In step S702-5, since the third pixel (=left end pixel of original) hasbeen compressed by neglecting the lower 8 bits, the input 8-bit data ismultiplied by 256 and output as 16-bit data. That is, q[2,j]=c[2,j]<<8.

In step S702-6, the fourth and subsequent pixels are decoded by thefollowing process.

That is, q[i,j]=q[i−1,j]+revtable[c[i,j]] is calculated.

If q[i,j]>65535, q[i,j]=65535. If q[i,j]<0, q[i,j]=0.

In step S702-7, for each line (j=0 to n+2−1) of the rectangle, the DPCMdecompression processing unit 205 internally stores, as q′[j], thedecompression output value q[m−1,j] of the m-th pixel from the left endof the input rectangle.

In step S207-8, when all pixels of the input rectangle are decompressed(j=n+2−1), the process advances to step S702-20.

In step S702-9, when the decompression process has reached the right endof the input rectangle (i=m+2−1), the process advances to step S702-10.Otherwise, the process advances to step S702-11.

In step S702-10, the value j is incremented by “+1”. Then, the processreturns to step S702-3.

In step S702-11, the value i is incremented by “+1”. Then, the processreturns to step S702-6.

In step S702-12, the decompression process of the j-th line of the inputrectangle starts.

In step S702-13, if i=0, the following process is performed by using thedecompression output value q′[j] stored in the process in step S702-7 orS702-15.

That is, q[0,j]=q′[j]+revtable[c[0,j]] is calculated. If q[0,j]>65535,q[0,j]=65535. If q[0,j]<0, q[0,j]=0.

In step S702-14, the following process is executed.

When i≠0, q[i,j]=q[i−1,j]+revtable [c[i,j]] is calculated. Ifq[i,j]>65535, q[i,j]=65535. If q[i,j]<0, q[i,j]=0.

In step S702-15, for each line (j=0 to n+2−1) of the rectangle, the DPCMdecompression processing unit 205 internally stores, as q′[j], thedecompression output value q[m−1,j] of the m-th pixel from the left endof the input rectangle.

In step S702-16, it is checked whether or not all pixels of the inputrectangle are decompressed. If j=n+2−1, the process advances to stepS702-20. If j≠n+2−1, the process advances to step S702-17.

In step S702-17, it is checked whether or not the decompression processhas reached the right end of the input rectangle. If i=m+2−1, theprocess advances to step S702-18. If i≠m+2−1, the process advances tostep S702-19.

In step S702-18, the value j is incremented by “+1”. Then, the processreturns to step S702-12.

In step S702-19, the value i is incremented by “+1”. Then, the processreturns to step S702-14.

In step S702-20, since the decompression process of the rectangle ofinterest finishes in step S702-8 or S702-16, a character determinationprocess and a filter process are executed for the decompressedrectangular image data. The shading process and γ-conversion process arenot executed here because they have already been performed in the copyimage processing unit. The filter processing unit removes the margincorresponding to two pixels on each of the upper, lower, left, and rightsides of an input rectangle. The result is written in buffer 2 in themain memory 2000 for each rectangle by using the DMAC 210.

In step S702-21, it is checked whether or not the current rectangle ofinterest is at the right end of the stripe. If “YES” in step S702-21,the process of the stripe ends. Otherwise, the process advances to stepS702-22.

In step S702-22, the rectangle of interest is shifted rightward by oneunit, and the process returns to step S701.

In the above-described manner, the scanner image processing unit 200executes the process of one stripe of the input image. The process isrepeated for each stripe.

The processes will be summarized as follows. In the copy mode, theshading process and γ-conversion process are executed for digital imagedata line-sequentially input from the AFE 2400 by using shading datastored in the shading memory 122 in the copy image processing unit 120.Then, the DPCM compression process is executed, and the compressed datais line-sequentially written in the main memory. The scanner imageprocessing unit 200 decompresses the compressed data read out from themain memory in correspondence with each rectangle and executes variouskinds of image processing such as the filter process other than theshading and γ-conversion processes.

In the scan mode, digital image data line-sequentially input from theAFE 2400 is not subjected to the process by the copy image processingunit 120 and is line-sequentially written in the main memory withoutcompression. The scanner image processing unit reads out the image dataof each rectangle and simultaneously reads out shading datacorresponding to the position of the rectangle from the main memory. Thescanner image processing unit 200 executes the shading process and inputγ-conversion process, and then executes various kinds of imageprocessing such as the filter process.

FIG. 4 is a view showing a buffer memory necessary when copy and scanare executed in accordance with the embodiment. As shown in FIG. 4,according to this embodiment, the capacity of buffer 1 necessary in thecopy mode decreases to ½ that of the prior art because of image datacompression. That is, the decrease amount by compression corresponds tothe difference in size between buffer 1 in the copy mode and that in thescan mode.

The total size of the buffer memory necessary in the scan mode remainsunchanged. The scan mode requires a smaller buffer memory sizeinherently as compared to the copy mode.

That is, in this embodiment, the copy image processing unit 120 is addedbetween the scanner I/F 100 and the DMAC 110, and image data of eachline input from the scanner I/F is compressed only in the copy mode,unlike the prior art. Then, the compressed image data is written in themain memory 2000 via the DMAC 110. This contributes to reducing thenecessary size of buffer 1 between the scanner I/F 100 and the scannerimage processing unit 200, and the memory band between the control chipand the main memory.

The scanner image processing unit 200 reads out the compressed imagedata of each rectangle from the main memory 2000. The DPCM decompressionprocessing unit 205 newly added in the scanner image processing unit 200decompresses the image data for each line. Then, the subsequent imageprocessing is executed.

In the scan mode, the same process as in the prior art withoutcompressing the image data output from the scanner I/F to the DMAC 110and decompressing in the DPCM decompression processing unit 205 isexecuted, thereby preventing image degradation upon compression.

In this embodiment, a fixed length DPCM compression process that encodesthe difference value between the current pixel and the preceding inputpixel is employed as the compression process. The DPCM compressionprocess utilizes high correlation between adjacent pixels in image data.If this compression method is used before the shading process thatcorrects the sensitivity fluctuation between the pixels of the sensor,the image quality largely degrades upon compression.

To solve this problem, in this embodiment, the shading process andγ-conversion process are executed first for the line-sequential dataoutput from the scanner I/F 100. Then, the DPCM compression is executed.The γ-conversion further reduces the gradation change as compared to acase where this conversion is not executed. Hence, image degradationupon DPCM compression can further be suppressed.

In Japanese Patent Publication Laid-Open No. 2004-220584, shading datais read out from the main memory together with image data. In thisembodiment, the shading memory 122 comprised of an SRAM is provided inthe copy image processing unit to speed up the shading data readoperation and decrease the number of times of read operation from themain memory. Data stored in the shading memory in advance is used asshading data necessary for the shading process in the copy mode. Thisallows the capacity of the main memory to hold shading data in the copymode to be reduced and obviates the shading data read operation from themain memory.

According to the above-described embodiment, the buffer memory capacitynecessary in the copy mode decreases. It is therefore possible to reducethe buffer memory size necessary for the entire system to implement thecopy and scan functions.

Additionally, the number of times of data input/output operationsbetween the control chip and the main memory (buffer 1) halves.Selective use of the buffer memory in the copy and scan modes providesthe following advantages.

(1) The main memory capacity necessary in the copy mode decreases, andthe memory size required of the entire system decreases. This leads toreduction of the total cost of the apparatus.

(2) The number of memory input/output operations related to image dataand shading data in the copy mode decreases.

(3) The shading data area in the main memory in the copy mode becomesunnecessary.

(4) Image degradation upon DPCM image compression in the scan mode isprevented.

(5) Since the shading process in the reading processing unit is executedonly in the copy mode, the capacity of the shading memory necessary inthe copy image processing unit is reduced.

Another embodiment of the present invention will now be described.

In the above-described embodiment, both the copy image processing unit120 and the scanner image processing unit 200 have shading processingunits 121 and 201 and γ-conversion processing units 123 and 202,respectively. However, these two units in the copy image processing unit120 and the counterparts in the scanner image processing unit 200 arefunctionally identical and never operate simultaneously. Hence, the MPFmay be arranged such that it includes a single shading processing unit,a single γ-conversion processing unit and a selector, and the data flowis switched over by the selector.

The operation will be described with reference to FIG. 9.

<Operation in Copy Mode>

Image data A/D-converted by an AFE 2400 is sent to a common imageprocessing unit 130 by a selector 140 via a scanner I/F 100. A shadingprocessing unit 131 executes shading correction by referring to shadingdata in a shading (SHD) memory 132. The shading processing unit 131executes correction even in the scan mode, as will be described later.After the process by a γ-conversion processing unit 133, a DPCMcompression processing unit 124 compresses the image data received via aselector 150. The compressed data is stored in a main memory 2000 via aDMAC 110. The compressed image data read out from the main memory 2000is sent to a selector 160 via a DMAC 210. The selector 160 switches tosend the image data to a scanner image processing unit 200. The imagedata is decompressed by a DPCM decompression processing unit 205 andundergoes processing by a character determination processing unit 203and a filter processing unit 204. The image data is input to a printerimage processing unit 300 via the DMACs 210 and 310 and converted intodata to be sent to the printer.

<Operation in Scan Mode>

The flow of image data up to the selector 140 is the same as in the copymode. The selector 140 switches to transfer the uncompressed image datato the main memory 2000 via the DMAC 110 and store it under control of amemory control unit 500.

The uncompressed image data read out from the main memory 2000 is sentto the common image processing unit 130 by the selector 160 via the DMAC210. The image data undergoes shading processing and γ-conversionprocessing, as in the copy mode, and is directly sent to the characterdetermination processing unit 203 by the selector 150. The image data inthe scan mode is uncompressed image data and need not pass through theDPCM decompression processing unit 205. The subsequent data flow is thesame as in the copy mode.

According to this embodiment, the common image processing unit 130executes the processes common to the copy and scan modes. Hence, theprocess and system can be simplified.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Applications Nos.2006-188697 and 2007-168087, respectively filed Jul. 7, 2006 and Jun.26, 2007, which are hereby incorporated by reference herein in theirentirety.

1. A multifunction printer having a first function of copying an imageoriginal and a second function of transferring image data obtained byscanning the image original to an external device (PC), comprising:reading means configured to line-sequentially read the image original toobtain uncompressed image data; a memory; first image processing meansconfigured to execute a shading process and a compressing process forthe image data; transfer means configured to transfer the image datafrom said reading means to said memory means via said first imageprocessing means when the first function of copying an image original isexecuted, such that shaded and compressed image data is transferred tosaid memory, and to transfer the image data from said reading means tosaid memory without shading and compression by said first imageprocessing means when the second function of transferring image dataobtained by scanning is executed; second image processing meansconfigured to decompress compressed image data read from said memorywhen the first function is executed, and to execute a shading processfor uncompressed image data read from said memory when the secondfunction is executed; and filtering means configured to execute afiltering process for the image data processed by said second imageprocessing means.
 2. The printer according to claim 1, wherein saidfirst image processing means line-sequentially compresses the image dataread by said reading means.
 3. The printer according to claim 1, whereinsaid first image processing means compresses the image data by a DPCMmethod.
 4. The printer according to claim 1, further comprising: thirdimage processing means configured to convert the filtered image data bysaid filtering means into data to be sent; print means configured toprint an image on a printing medium by using the data.
 5. The printeraccording to claim 1, wherein said second image processing meansdecompresses the compressed image data by a DPCM method.
 6. The printeraccording to claim 1, wherein said first image processing means and saidsecond image processing means are implemented on a semiconductor chip.7. The printer according to claim 1, wherein said first image processingmeans further includes: shading processing means configured to executethe shading process for the image data read by said reading means priorto image data compression by compression means; and γ-conversion meansconfigured to execute γ-conversion for the image data that has undergonethe shading process by said shading processing means.
 8. The printeraccording to claim 1, wherein said second image processing meansincludes: shading processing means configured to execute a shadingprocess for the uncompressed image data read out from said memory; andγ-conversion means configured to execute γ-conversion for the image datathat has undergone the shading process by said second shading processingmeans.
 9. An image processing method executed by a multifunction printerhaving a first function of copying an image original and a secondfunction of transferring image data obtained by scanning the imageoriginal to an external device (PC), the method comprising the steps of:line-sequentially reading the image original to obtain uncompressedimage data; upon execution of the first function of copying an imageoriginal, shading and compressing the read image data using a firstimage processing means, transferring the shaded and compressed imagedata to a memory, and decompressing the compressed image data read fromthe memory; and upon execution of the second function of transferringimage data obtained by scanning, transferring the read image data to thememory without shading and compressing the read image data by using thefirst image processing means, and shading the uncompressed and unshadedimage data read from the memory.